package com.sc.sc250601.cook.mapper;

import com.sc.sc250601.cook.pojo.Post;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface PostMapper {
    int updateLikeCount(@Param("postId") Long postId,@Param("likeCount") Long likeCount);
    int updateViewCount(@Param("postId") Long postId,@Param("viewCount") Long viewCount);
    int addViewCount(Long id);
    Long selectLikeCount(Long id);
    int addLikeCount(@Param("id") Long id,@Param("updateTime") Date happy);
    int reduceLikeCount(@Param("id") Long id,@Param("updateTime") Date happy);
    List<Post> selectByUid(@Param("list") List<Long> uids);
    List<Post> selectAll();
    int deleteByPrimaryKey(Long id);

    int insert(Post record);

    int insertSelective(Post record);

    Post selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Post record);

    int updateByPrimaryKeyWithBLOBs(Post record);

    int updateByPrimaryKey(Post record);
}